package cn.sharp.bbs.event;

import org.springframework.context.ApplicationEvent;

/**
 * userId对应用户收到私信事件
 * @author zhao yu
 */
public class LetterEvent extends ApplicationEvent {
    private Long userId; //收到消息的用户的id
    private Long chatRoom; //聊天室的id

    public LetterEvent(Object source) {
        super(source);
    }

    public LetterEvent(Object source, Long userId, Long chatRoom) {
        super(source);
        this.userId = userId;
        this.chatRoom = chatRoom;
    }

    public Long getUserId() {
        return userId;
    }

    public Long getChatRoom() {
        return chatRoom;
    }
}
